php ++

77

php ++ -

// POST INCREMENTING
$i = 10;
$a = $i++;
// Now $a is 10, and $i is 11

//PRE INCREMENTING : it is FASTER (-10% than previous above)
$i = 10;
$a = ++$i;
// Now $a is 11, and $i is 11

Comments

Submit
0 Comments